package hfjava;

public class Score_2 {
    public static void main(String[] args) {
        int[][] scores=new int[][]{{60,75,80},{65,76,80},{65,64,81},{65,64,95},{54,65,89}};
        int sum=0;
        for (int i = 0; i <scores.length ; i++) {
            int max=scores[i][0];
            int min=scores[i][0];

            for (int j = 0; j <scores[i].length ; j++) {
                sum+=scores[i][j];

            }
            for (int j = 1; j <scores[i].length ; j++) {
                sum+=scores[i][j];
                if (max<scores[i][j]){
                    max=scores[i][j];
                }
                if (min>scores[i][j]){
                    min=scores[i][j];
                }
            }
            int avgscore=sum/3;
            System.out.println((i+1)+"同学总分："+sum);
            System.out.println((i+1)+"同学平均分："+avgscore);
            System.out.println((i+1)+"同学最高分："+max);
            System.out.println((i+1)+"同学最低分："+min);
            System.out.println("\n");
        }
    }
}
